package classload;

/**
 * 测试 StackOverflowError
 */
public class StackOverflowTest {
    static int count = 0;

    static void test() {
        count++;
        test();
    }


    public static void main(String[] args) {
        try {
            test();
        } catch (Throwable throwable) {
            throwable.printStackTrace();
            System.out.println(count);
        }
    }
}
